<template>
	<view class="main">
		<u-navbar :is-back="true" title="消息详情" :background="background" :border-bottom="false" title-color="#fff"
			title-size="35rpx" title-bold="true" back-icon-color="#fff">
		</u-navbar>
		<view class="news">
			<view class="tit">
				{{list.title}}
			</view>
			<view class="time">
				{{list.create_time}}
			</view>
			<view class="content">
					<u-parse :html="list.details" :selectable="true"></u-parse>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				background: {
					backgroundColor: '#111111',
				},
				limit: 10,
				page: 1,
				list: {}
			}
		},
		onLoad() {
			this.getinfo()
		},
		methods: {
			getinfo() {
				const that = this
				// #ifdef APP-NVUE
				const eventChannel = that.$scope.eventChannel; // 兼容APP-NVUE
				// #endif
				// #ifndef APP-NVUE
				const eventChannel = that.getOpenerEventChannel();
				// #endif
				eventChannel.on('details', function(data) {
					console.log(data.data)
				
					global.$http.request({
						url: '/api/notice/noticeDetail',
						data: {
							notice_id: data.data.id,
						}
					}).then(res => {
						if (res.data.code == 0) {
							console.log(res.data.data);
							that.list= res.data.data
						}
					})
				})
			},
		}
	}
</script>

<style lang="scss">
	page {
		font-family: PingFang SC-Bold, PingFang SC;
		background-color: #111111;
		width: 750rpx;

		.main {
			margin-top: 24rpx;
			display: flex;
			flex-direction: column;
			align-items: center;

			.news {
				width: 686rpx;
				background: #181818;
				border-radius: 32rpx;
				opacity: 1;
				padding: 32rpx 24rpx;

				.tit {
					font-size: 32rpx;
					font-weight: bold;
					color: #FFFFFF;
				}

				.time {
					font-size: 24rpx;
					font-weight: 400;
					color: #999999;
					padding: 16rpx 0 28rpx 0;
				}

				.content {
					font-size: 28rpx;
					font-family: PingFang SC-Regular, PingFang SC;
					font-weight: 400;
					color: #FFFFFF;
					line-height: 48rpx;
				}
			}
		}
	}
</style>
